package com.qf.pickname.dao.impl;

import com.qf.pickname.dao.StudentDao;
import com.qf.pickname.entity.Student;
import com.qf.pickname.utils.StudentDataStore;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

// 添加该注解的作业和Service一样
@Repository
//@Component
public class SutdentDaoImpl implements StudentDao {
    @Override
    public Integer getStudentCount() {
        return StudentDataStore.students.size();
    }

    @Override
    public Student getStudentByIndex(Integer index) {
        return StudentDataStore.students.get(index);
    }
}
